//
//  ViewController.m
//  TestWebImage
//
//  Created by xiangbc on 16/2/19.
//  Copyright © 2016年 xbc. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()
{
    
    __weak IBOutlet UIWebView *_webView;
}

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)btnUpInside:(id)sender {
    NSString *str = NSHomeDirectory();
    NSString *path = [NSString stringWithFormat:@"%@/Documents/img/googlelogo_color_272x92dp.png", str];
    
    NSString *html = [NSString stringWithFormat:@"<html>"
                      "<head>"
                      "<meta charset=\"utf-8\">"
                      "<head/>"
                      "content<p/>"
                      "<img src=\"file://%@\">"
                      "<html/>", path];
    [_webView loadHTMLString:html baseURL:nil];
}


@end
